﻿package player{
	import flash.utils.Dictionary;
	
	import mx.collections.ArrayCollection;
	
	import vo.qVo;

//	import flash.utils.Dictionary;
	
	
	/**
	 * ...
	 * @author Jobe Makar - jobe@electrotank.com
	 */
	public class Player {
		
		private var _score:int;
		private var _name:String;
		private var _isMe:Boolean;
		
		
		private var acScoreMap:ArrayCollection;
		
		public var isServerMan:Boolean = false;
		//private var _trowel:Trowel;
		
		public function Player() {
			acScoreMap = new ArrayCollection();
			_isMe = false;
			//_playersQ = new Dictionary();			
		}

		
		public function setMyQst(iQIdx:int, bIso:Boolean):void {			
			var qObj:qVo  = new qVo();
			qObj.qIdx = iQIdx;
			qObj.isO = bIso;
			
			acScoreMap.addItem(qObj);
		}
		
		public function getMyTotScore():int {
			var isOcnt:uint = 0;
			for(var i:uint;i<acScoreMap.length;i++) {
				if(acScoreMap.getItemAt(i).isO == true) {
					isOcnt ++;
				}
			}
			return isOcnt;
		}
		/*
		public function isAnswerQ(iQIdx:int):Boolean {
			
			if(abMap.containsKey(iQIdx) == true) {
				return true;
			}
				// 없으면 새로 생성
			else {
				return false;
			}
		}
		*/
		
		
		
		
		
		
		public function get score():int { return _score; }
		
		public function set score(value:int):void {
			_score = value;
		}
		
		public function get name():String { return _name; }
		
		public function set name(value:String):void {
			_name = value;
		}
		
		public function get isMe():Boolean { return _isMe; }
		
		public function set isMe(value:Boolean):void {
			_isMe = value;
		}
		/*
		public function get trowel():Trowel { return _trowel; }
		*/
	}
	
}